3.760 \(\int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{\sqrt {c-i c \tan (e+f x)}} \, dx\)

Optimal. Leaf size=140 \[ \frac {2 a^3 (5 B+i A) (c-i c \tan (e+f x))^{3/2}}{3 c^2 f}-\frac {8 a^3 (2 B+i A) \sqrt {c-i c \tan (e+f x)}}{c f}-\frac {8 a^3 (B+i A)}{f \sqrt {c-i c \tan (e+f x)}}-\frac {2 a^3 B (c-i c \tan (e+f x))^{5/2}}{5 c^3 f} \]

[Out]

-8*a^3*(I*A+B)/f/(c-I*c*tan(f*x+e))^(1/2)-8*a^3*(I*A+2*B)*(c-I*c*tan(f*x+e))^(1/2)/c/f+2/3*a^3*(I*A+5*B)*(c-I*
c*tan(f*x+e))^(3/2)/c^2/f-2/5*a^3*B*(c-I*c*tan(f*x+e))^(5/2)/c^3/f

________________________________________________________________________________________

Rubi [A]  time = 0.19, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps used = 3, number of rules used = 2, integrand size = 43, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.047, Rules used = {3588, 77} \[ \frac {2 a^3 (5 B+i A) (c-i c \tan (e+f x))^{3/2}}{3 c^2 f}-\frac {8 a^3 (2 B+i A) \sqrt {c-i c \tan (e+f x)}}{c f}-\frac {8 a^3 (B+i A)}{f \sqrt {c-i c \tan (e+f x)}}-\frac {2 a^3 B (c-i c \tan (e+f x))^{5/2}}{5 c^3 f} \]

Antiderivative was successfully verified.

[In]

Int[((a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x]))/Sqrt[c - I*c*Tan[e + f*x]],x]

[Out]

(-8*a^3*(I*A + B))/(f*Sqrt[c - I*c*Tan[e + f*x]]) - (8*a^3*(I*A + 2*B)*Sqrt[c - I*c*Tan[e + f*x]])/(c*f) + (2*
a^3*(I*A + 5*B)*(c - I*c*Tan[e + f*x])^(3/2))/(3*c^2*f) - (2*a^3*B*(c - I*c*Tan[e + f*x])^(5/2))/(5*c^3*f)

Rule 77

Int[((a_.) + (b_.)*(x_))*((c_) + (d_.)*(x_))^(n_.)*((e_.) + (f_.)*(x_))^(p_.), x_Symbol] :> Int[ExpandIntegran
d[(a + b*x)*(c + d*x)^n*(e + f*x)^p, x], x] /; FreeQ[{a, b, c, d, e, f, n}, x] && NeQ[b*c - a*d, 0] && ((ILtQ[
n, 0] && ILtQ[p, 0]) || EqQ[p, 1] || (IGtQ[p, 0] && ( !IntegerQ[n] || LeQ[9*p + 5*(n + 2), 0] || GeQ[n + p + 1
, 0] || (GeQ[n + p + 2, 0] && RationalQ[a, b, c, d, e, f]))))

Rule 3588

Int[((a_) + (b_.)*tan[(e_.) + (f_.)*(x_)])^(m_.)*((A_.) + (B_.)*tan[(e_.) + (f_.)*(x_)])*((c_) + (d_.)*tan[(e_
.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[(a*c)/f, Subst[Int[(a + b*x)^(m - 1)*(c + d*x)^(n - 1)*(A + B*x), x
], x, Tan[e + f*x]], x] /; FreeQ[{a, b, c, d, e, f, A, B, m, n}, x] && EqQ[b*c + a*d, 0] && EqQ[a^2 + b^2, 0]

Rubi steps

\begin {align*} \int \frac {(a+i a \tan (e+f x))^3 (A+B \tan (e+f x))}{\sqrt {c-i c \tan (e+f x)}} \, dx &=\frac {(a c) \operatorname {Subst}\left (\int \frac {(a+i a x)^2 (A+B x)}{(c-i c x)^{3/2}} \, dx,x,\tan (e+f x)\right )}{f}\\ &=\frac {(a c) \operatorname {Subst}\left (\int \left (\frac {4 a^2 (A-i B)}{(c-i c x)^{3/2}}-\frac {4 a^2 (A-2 i B)}{c \sqrt {c-i c x}}+\frac {a^2 (A-5 i B) \sqrt {c-i c x}}{c^2}+\frac {i a^2 B (c-i c x)^{3/2}}{c^3}\right ) \, dx,x,\tan (e+f x)\right )}{f}\\ &=-\frac {8 a^3 (i A+B)}{f \sqrt {c-i c \tan (e+f x)}}-\frac {8 a^3 (i A+2 B) \sqrt {c-i c \tan (e+f x)}}{c f}+\frac {2 a^3 (i A+5 B) (c-i c \tan (e+f x))^{3/2}}{3 c^2 f}-\frac {2 a^3 B (c-i c \tan (e+f x))^{5/2}}{5 c^3 f}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 7.59, size = 152, normalized size = 1.09 \[ -\frac {2 a^3 \sqrt {c-i c \tan (e+f x)} (\cos (e+4 f x)+i \sin (e+4 f x)) (A+B \tan (e+f x)) ((25 A-38 i B) \tan (e+f x)+\cos (2 (e+f x)) ((25 A-41 i B) \tan (e+f x)+55 i A+71 B)+60 i A+87 B)}{15 c f (\cos (f x)+i \sin (f x))^3 (A \cos (e+f x)+B \sin (e+f x))} \]

Antiderivative was successfully verified.

[In]

Integrate[((a + I*a*Tan[e + f*x])^3*(A + B*Tan[e + f*x]))/Sqrt[c - I*c*Tan[e + f*x]],x]

[Out]

(-2*a^3*(Cos[e + 4*f*x] + I*Sin[e + 4*f*x])*(A + B*Tan[e + f*x])*Sqrt[c - I*c*Tan[e + f*x]]*((60*I)*A + 87*B +
 (25*A - (38*I)*B)*Tan[e + f*x] + Cos[2*(e + f*x)]*((55*I)*A + 71*B + (25*A - (41*I)*B)*Tan[e + f*x])))/(15*c*
f*(Cos[f*x] + I*Sin[f*x])^3*(A*Cos[e + f*x] + B*Sin[e + f*x]))

________________________________________________________________________________________

fricas [A]  time = 1.40, size = 125, normalized size = 0.89 \[ \frac {\sqrt {2} {\left ({\left (-60 i \, A - 60 \, B\right )} a^{3} e^{\left (6 i \, f x + 6 i \, e\right )} + {\left (-300 i \, A - 420 \, B\right )} a^{3} e^{\left (4 i \, f x + 4 i \, e\right )} + {\left (-400 i \, A - 560 \, B\right )} a^{3} e^{\left (2 i \, f x + 2 i \, e\right )} + {\left (-160 i \, A - 224 \, B\right )} a^{3}\right )} \sqrt {\frac {c}{e^{\left (2 i \, f x + 2 i \, e\right )} + 1}}}{15 \, {\left (c f e^{\left (4 i \, f x + 4 i \, e\right )} + 2 \, c f e^{\left (2 i \, f x + 2 i \, e\right )} + c f\right )}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x, algorithm="fricas")

[Out]

1/15*sqrt(2)*((-60*I*A - 60*B)*a^3*e^(6*I*f*x + 6*I*e) + (-300*I*A - 420*B)*a^3*e^(4*I*f*x + 4*I*e) + (-400*I*
A - 560*B)*a^3*e^(2*I*f*x + 2*I*e) + (-160*I*A - 224*B)*a^3)*sqrt(c/(e^(2*I*f*x + 2*I*e) + 1))/(c*f*e^(4*I*f*x
 + 4*I*e) + 2*c*f*e^(2*I*f*x + 2*I*e) + c*f)

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {{\left (B \tan \left (f x + e\right ) + A\right )} {\left (i \, a \tan \left (f x + e\right ) + a\right )}^{3}}{\sqrt {-i \, c \tan \left (f x + e\right ) + c}}\,{d x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x, algorithm="giac")

[Out]

integrate((B*tan(f*x + e) + A)*(I*a*tan(f*x + e) + a)^3/sqrt(-I*c*tan(f*x + e) + c), x)

________________________________________________________________________________________

maple [A]  time = 0.30, size = 135, normalized size = 0.96 \[ \frac {2 i a^{3} \left (\frac {i B \left (c -i c \tan \left (f x +e \right )\right )^{\frac {5}{2}}}{5}-\frac {5 i B \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}} c}{3}+\frac {A \left (c -i c \tan \left (f x +e \right )\right )^{\frac {3}{2}} c}{3}+8 i B \,c^{2} \sqrt {c -i c \tan \left (f x +e \right )}-4 A \,c^{2} \sqrt {c -i c \tan \left (f x +e \right )}-\frac {4 c^{3} \left (-i B +A \right )}{\sqrt {c -i c \tan \left (f x +e \right )}}\right )}{f \,c^{3}} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x)

[Out]

2*I/f*a^3/c^3*(1/5*I*B*(c-I*c*tan(f*x+e))^(5/2)-5/3*I*B*(c-I*c*tan(f*x+e))^(3/2)*c+1/3*A*(c-I*c*tan(f*x+e))^(3
/2)*c+8*I*B*c^2*(c-I*c*tan(f*x+e))^(1/2)-4*A*c^2*(c-I*c*tan(f*x+e))^(1/2)-4*c^3*(A-I*B)/(c-I*c*tan(f*x+e))^(1/
2))

________________________________________________________________________________________

maxima [A]  time = 0.62, size = 108, normalized size = 0.77 \[ -\frac {2 i \, {\left (\frac {60 \, {\left (A - i \, B\right )} a^{3} c}{\sqrt {-i \, c \tan \left (f x + e\right ) + c}} - \frac {3 i \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {5}{2}} B a^{3} + 5 \, {\left (-i \, c \tan \left (f x + e\right ) + c\right )}^{\frac {3}{2}} {\left (A - 5 i \, B\right )} a^{3} c - 60 \, \sqrt {-i \, c \tan \left (f x + e\right ) + c} {\left (A - 2 i \, B\right )} a^{3} c^{2}}{c^{2}}\right )}}{15 \, c f} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))^3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))^(1/2),x, algorithm="maxima")

[Out]

-2/15*I*(60*(A - I*B)*a^3*c/sqrt(-I*c*tan(f*x + e) + c) - (3*I*(-I*c*tan(f*x + e) + c)^(5/2)*B*a^3 + 5*(-I*c*t
an(f*x + e) + c)^(3/2)*(A - 5*I*B)*a^3*c - 60*sqrt(-I*c*tan(f*x + e) + c)*(A - 2*I*B)*a^3*c^2)/c^2)/(c*f)

________________________________________________________________________________________

mupad [B]  time = 12.43, size = 351, normalized size = 2.51 \[ -\sqrt {c+\frac {c\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}-\mathrm {i}\right )\,1{}\mathrm {i}}{{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1}}\,\left (\frac {a^3\,\left (A-B\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{c\,f}+\frac {a^3\,{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,\left (A-B\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{c\,f}\right )-\left (\frac {a^3\,\left (A-B\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{c\,f}+\frac {a^3\,\left (A-B\,3{}\mathrm {i}\right )\,4{}\mathrm {i}}{c\,f}\right )\,\sqrt {c+\frac {c\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}-\mathrm {i}\right )\,1{}\mathrm {i}}{{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1}}-\frac {\left (\frac {a^3\,\left (A-B\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{5\,c\,f}-\frac {a^3\,\left (A+B\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{5\,c\,f}\right )\,\sqrt {c+\frac {c\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}-\mathrm {i}\right )\,1{}\mathrm {i}}{{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1}}}{{\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1\right )}^2}+\frac {\left (\frac {16\,B\,a^3}{3\,c\,f}+\frac {a^3\,\left (A-B\,1{}\mathrm {i}\right )\,4{}\mathrm {i}}{3\,c\,f}\right )\,\sqrt {c+\frac {c\,\left ({\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}\,1{}\mathrm {i}-\mathrm {i}\right )\,1{}\mathrm {i}}{{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1}}}{{\mathrm {e}}^{e\,2{}\mathrm {i}+f\,x\,2{}\mathrm {i}}+1} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((A + B*tan(e + f*x))*(a + a*tan(e + f*x)*1i)^3)/(c - c*tan(e + f*x)*1i)^(1/2),x)

[Out]

(((a^3*(A - B*1i)*4i)/(3*c*f) + (16*B*a^3)/(3*c*f))*(c + (c*(exp(e*2i + f*x*2i)*1i - 1i)*1i)/(exp(e*2i + f*x*2
i) + 1))^(1/2))/(exp(e*2i + f*x*2i) + 1) - ((a^3*(A - B*1i)*4i)/(c*f) + (a^3*(A - B*3i)*4i)/(c*f))*(c + (c*(ex
p(e*2i + f*x*2i)*1i - 1i)*1i)/(exp(e*2i + f*x*2i) + 1))^(1/2) - (((a^3*(A - B*1i)*4i)/(5*c*f) - (a^3*(A + B*1i
)*4i)/(5*c*f))*(c + (c*(exp(e*2i + f*x*2i)*1i - 1i)*1i)/(exp(e*2i + f*x*2i) + 1))^(1/2))/(exp(e*2i + f*x*2i) +
 1)^2 - (c + (c*(exp(e*2i + f*x*2i)*1i - 1i)*1i)/(exp(e*2i + f*x*2i) + 1))^(1/2)*((a^3*(A - B*1i)*4i)/(c*f) +
(a^3*exp(e*2i + f*x*2i)*(A - B*1i)*4i)/(c*f))

________________________________________________________________________________________

sympy [F]  time = 0.00, size = 0, normalized size = 0.00 \[ - i a^{3} \left (\int \frac {i A}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx + \int \left (- \frac {3 A \tan {\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\right )\, dx + \int \frac {A \tan ^{3}{\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx + \int \left (- \frac {3 B \tan ^{2}{\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\right )\, dx + \int \frac {B \tan ^{4}{\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx + \int \left (- \frac {3 i A \tan ^{2}{\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\right )\, dx + \int \frac {i B \tan {\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\, dx + \int \left (- \frac {3 i B \tan ^{3}{\left (e + f x \right )}}{\sqrt {- i c \tan {\left (e + f x \right )} + c}}\right )\, dx\right ) \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+I*a*tan(f*x+e))**3*(A+B*tan(f*x+e))/(c-I*c*tan(f*x+e))**(1/2),x)

[Out]

-I*a**3*(Integral(I*A/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-3*A*tan(e + f*x)/sqrt(-I*c*tan(e + f*x) + c)
, x) + Integral(A*tan(e + f*x)**3/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-3*B*tan(e + f*x)**2/sqrt(-I*c*ta
n(e + f*x) + c), x) + Integral(B*tan(e + f*x)**4/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-3*I*A*tan(e + f*x
)**2/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(I*B*tan(e + f*x)/sqrt(-I*c*tan(e + f*x) + c), x) + Integral(-3
*I*B*tan(e + f*x)**3/sqrt(-I*c*tan(e + f*x) + c), x))

________________________________________________________________________________________